package com.bdqn.shequ.modules.sys.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.bdqn.shequ.common.validator.group.AddGroup;
import com.bdqn.shequ.common.validator.group.UpdateGroup;
import lombok.Data;

import javax.validation.constraints.*;
import java.io.Serializable;
import java.util.Date;

/**
 * 会员表
 * 
 * @author Mark
 * @email sunlightcs@gmail.com
 * @date 2019-04-12 11:02:59
 */
@Data
@TableName("tc_member")
public class TcMemberEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 主键id
	 */
	@TableId
	private Long id;
	/**
	 * 电话
	 */
	@NotBlank(message="电话不能为空", groups = {AddGroup.class, UpdateGroup.class})
	@Pattern(regexp ="^1([38][0-9]|4[579]|5[0-3,5-9]|6[6]|7[0135678]|9[89])\\d{8}$",message = "手机号码格式错误", groups = {AddGroup.class, UpdateGroup.class})

	private String phone;
	/**
	 * 用户真实姓名
	 */
	@NotBlank(message="用户真实姓名不能为空", groups = {AddGroup.class, UpdateGroup.class})
	private String realName;
	/**
	 * 会员性别 MALE:男,FEMALE:女
	 */
	private String memberSex;
	/**
	 * 会员EMAIL
	 */
	@NotBlank(message="邮箱不能为空", groups = {AddGroup.class, UpdateGroup.class})
	@Email(message="邮箱格式不正确", groups = {AddGroup.class, UpdateGroup.class})
	private String memberEmail;
	/**
	 * 会员类型 GUEST:游客（允许授权）;REGULAR_MEMBER:普通会员;VERIFIED_MEMBER:认证会员;；DUTY_MANAGER:值班经理;
	 */
	private String memberType;
	/**
	 * 会员星级 1,2,3,4,5
	 */
	private Long memberLevel;
	/**
	 * 会员卡号
	 */
	private String memberCardNo;
	/**
	 * 二维码文件路径 (基于会员编号生成) 
	 */
	private String qrCodeFilePath;
	/**
	 * 合伙人（PARTNER:是合伙人;NOT_PARTNER:不是合伙人）
	 */
	private String partnerProperty;
	/**
	 * 推荐会员编号
	 */
	private String recommendMemberNo;
	/**
	 * 用户语言（需授权获得）
	 */
	@NotBlank(message="用户语言不能为空", groups = {AddGroup.class, UpdateGroup.class})
	private String memberLanguage;
	/**
	 * 使用状态： NORMAL:正常;FORBIDDEN:禁用
	 */
	private String useStatus;
	/**
	 * 会员状态 REGISTER_SUCCESS:会员注册成功;VERIFY_APPLIED:会员认证申请已提交;BACKGROUND_VERIFY_FAIL:后台认证失败;VERIFY_SUCCESS:会员认证成功;
	 */
	private String memberStatus;
	/**
	 * 订阅状态 授权获得,NOT_SUBSCRIBE:表示没有关注，拉不到其他信息；SUBSCRIBED:表示关注，可以拉到其他授权信息
	 */
	private String subscribeStatus;
	/**
	 * 会员总积分值
	 */
	@Min(value = 1, message = "总积分最小值为1", groups = {AddGroup.class, UpdateGroup.class}) // 最小值1积分
	private Integer totalIntegral;
	/**
	 * 会员总府宝值
	 */
	@Min(value = 1, message = "会员总府宝值最小值为1", groups = {AddGroup.class, UpdateGroup.class}) // 最小值1积分
	private Integer totalCredit;
	/**
	 * 国家
	 */
	@NotBlank(message="国家不能为空", groups = {AddGroup.class, UpdateGroup.class})
	private String country;
	/**
	 * 省
	 */
	@NotBlank(message="省不能为空", groups = {AddGroup.class, UpdateGroup.class})
	private String province;
	/**
	 * 城市
	 */
	@NotBlank(message="城市不能为空", groups = {AddGroup.class, UpdateGroup.class})
	private String city;
	/**
	 * 工作单位
	 */
	@NotBlank(message="工作单位不能为空", groups = {AddGroup.class, UpdateGroup.class})
	private String company;
	/**
	 * 乐观锁
	 */
	private Integer version;
	/**
	 * 备注
	 */
	private String remark;
	/**
	 * 关注时间
	 */
	private Date subscribeTime;
	/**
	 * 取消关注时间
	 */
	private Date cancelSubscribeTime;
	/**
	 * 创建时间
	 */
	private Date createTime;
	/**
	 * 更新时间
	 */
	private Date updateTime;
	/**
	 * 注册时间
	 */
	private Date registerTime;

	public static long getSerialVersionUID() {
		return serialVersionUID;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getRealName() {
		return realName;
	}

	public void setRealName(String realName) {
		this.realName = realName;
	}

	public String getMemberSex() {
		return memberSex;
	}

	public void setMemberSex(String memberSex) {
		this.memberSex = memberSex;
	}

	public String getMemberEmail() {
		return memberEmail;
	}

	public void setMemberEmail(String memberEmail) {
		this.memberEmail = memberEmail;
	}

	public String getMemberType() {
		return memberType;
	}

	public void setMemberType(String memberType) {
		this.memberType = memberType;
	}

	public Long getMemberLevel() {
		return memberLevel;
	}

	public void setMemberLevel(Long memberLevel) {
		this.memberLevel = memberLevel;
	}

	public String getMemberCardNo() {
		return memberCardNo;
	}

	public void setMemberCardNo(String memberCardNo) {
		this.memberCardNo = memberCardNo;
	}


	public String getQrCodeFilePath() {
		return qrCodeFilePath;
	}

	public void setQrCodeFilePath(String qrCodeFilePath) {
		this.qrCodeFilePath = qrCodeFilePath;
	}

	public String getPartnerProperty() {
		return partnerProperty;
	}

	public void setPartnerProperty(String partnerProperty) {
		this.partnerProperty = partnerProperty;
	}

	public String getRecommendMemberNo() {
		return recommendMemberNo;
	}

	public void setRecommendMemberNo(String recommendMemberNo) {
		this.recommendMemberNo = recommendMemberNo;
	}

	public String getMemberLanguage() {
		return memberLanguage;
	}

	public void setMemberLanguage(String memberLanguage) {
		this.memberLanguage = memberLanguage;
	}

	public String getUseStatus() {
		return useStatus;
	}

	public void setUseStatus(String useStatus) {
		this.useStatus = useStatus;
	}

	public String getMemberStatus() {
		return memberStatus;
	}

	public void setMemberStatus(String memberStatus) {
		this.memberStatus = memberStatus;
	}

	public String getSubscribeStatus() {
		return subscribeStatus;
	}

	public void setSubscribeStatus(String subscribeStatus) {
		this.subscribeStatus = subscribeStatus;
	}

	public Integer getTotalIntegral() {
		return totalIntegral;
	}

	public void setTotalIntegral(Integer totalIntegral) {
		this.totalIntegral = totalIntegral;
	}

	public Integer getTotalCredit() {
		return totalCredit;
	}

	public void setTotalCredit(Integer totalCredit) {
		this.totalCredit = totalCredit;
	}

	public String getCountry() {
		return country;
	}

	public void setCountry(String country) {
		this.country = country;
	}

	public String getProvince() {
		return province;
	}

	public void setProvince(String province) {
		this.province = province;
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public String getCompany() {
		return company;
	}

	public void setCompany(String company) {
		this.company = company;
	}

	public Integer getVersion() {
		return version;
	}

	public void setVersion(Integer version) {
		this.version = version;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public Date getSubscribeTime() {
		return subscribeTime;
	}

	public void setSubscribeTime(Date subscribeTime) {
		this.subscribeTime = subscribeTime;
	}

	public Date getCancelSubscribeTime() {
		return cancelSubscribeTime;
	}

	public void setCancelSubscribeTime(Date cancelSubscribeTime) {
		this.cancelSubscribeTime = cancelSubscribeTime;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public Date getRegisterTime() {
		return registerTime;
	}

	public void setRegisterTime(Date registerTime) {
		this.registerTime = registerTime;
	}
}
